package com.epoint.mapper;

import com.epoint.domain.Inspection;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.*;

public interface InspectionMapper {

    Inspection getInspectionById(String rowguid);

    Inspection getInspectionByIdAndProjectguidAndAnno(@Param("rowguid")String rowguid, @Param("projectguid") String projectguid);

    Inspection getInspectionByMap(Map<String, Object> params);

    List<Inspection> getAllInspection();

    Map<String, Object> getInspection2MapById(String rowguid);

    @MapKey("rowguid")
    Map<String, Inspection> getInspection2MapAndIdById(String rowguid);

    List<Map<String, Object>> getInspection2MapListAndIdById(String rowguid);

    // 适合多表查询的适合，1对多，想要一口气把数据封装的好看，便捷。 一个对象下面有N个子
    Inspection getInspectionAndRecordListById(String rowguid);

    // 适合多表查询的适合，1对多，想要一口气把数据封装的好看，便捷。 一个对象下面有N个子
    List<Inspection> getInspectionAndRecordList();

    List<Inspection> getInspectionListByDynamicSql(Map<String, Object> parmas);

    List<Inspection> getInspectionListByDynamicSql2(@Param("ids") List<String> ids);

    /**
     * 这种方式感觉适合用于做插入，更新
     */
    Inspection getInspectionByPoJo(Inspection in);

    Inspection getInspectionByIdAndProjectguid(String rowguid, String projectguid);

    int addInspection(Inspection in);

    int updateInspection(Inspection in);

    int deleteInspection(String rowguid);

}
